<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>HELLO，AMAP!</title>
    <!-- 一、设置地图大小 -->
    <style>
        html, body, #container {
          width: 300px;
          height: 300px;
        }
    </style>
    <!-- 二、引入资源 -->
      <script type="text/javascript">
        window._AMapSecurityConfig = {
          securityJsCode:"ec8990c1cac6e2f42866a4f908a19989",
        }
      </script>
      <script src="https://webapi.amap.com/loader.js"></script>
      <script type="text/javascript" >
        AMapLoader.load({
          key: "1d8c4c24f36ffedf82812d42f9835ac9",       // 申请好的Web端开发者Key，首次调用 load 时必填
          version: "2.0",                 // 指定要加载的 JSAPI 的版本，缺省时默认为 1.4.15
        }).then((AMap)=>{
          const map = new AMap.Map('container');
        }).catch((e)=>{
          console.error(e);  //加载错误提示
        });     
      </script>
</head>
<body>
  <!-- 三、创建地图容器 -->
  <div id="container"></div>
  <!-- 四、加载地图 -->

</body>
</html>